package com.enjoyor.soa.traffic.api.dto.vcsp;

import java.io.Serializable;

import com.enjoyor.soa.traffic.util.bean.base.ABean;

/**
 * @ClassName: StrategyInfo
 * @Description: 策略实体类
 * @author: Administrator
 * @date: 2019年2月18日 下午2:01:51
 */
public class VcspStrategyInfoDto implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 策略编号
     */
    private String strategy_id;
    /**
     * 策略名
     */
    private String strategy_name;
    /**
     * 代理编号
     */
    private String proxy_id;
    /**
     * 代理名称
     */
    private String proxy_name;
    /**
     * 代理ip
     */
    private String proxy_ip;
    /**
     * 是否闲时上传
     */
    private int is_free;
    /**
     * 空闲上传cpu最小值
     */
    private float free_min_cpu;
    /**
     * 空闲上传cpu最大值
     */
    private float free_max_cpu;
    /**
     * 空闲上传内存最小值
     */
    private float free_min_memory;
    /**
     * 空闲上传内存最大值
     */
    private float free_max_memory;
    /**
     * 空闲上传磁盘最小值
     */
    private float free_min_disk;
    /**
     * 空闲上传磁盘最大值
     */
    private float free_max_disk;
    /**
     * 空闲上传网络最小值
     */
    private float free_min_net;
    /**
     * 空闲上传网络最大值
     */
    private float free_max_net;
    /**
     * 空闲上传单次数量
     */
    private int free_upload_size;
    /**
     * 是否自定义策略
     */
    private int is_custom;
    /**
     * 自定义抽取时间区间
     */
    private String custom_interval;
    /**
     * 自定义运行周期类型
     */
    private String custom_type;
    /**
     * 自定义开始时间
     */
    private String custom_begin_time;
    /**
     * 自定义结束时间
     */
    private String custom_end_time;
    /**
     * 自定义开始时间
     */
    private String custom_begin_time2;
    /**
     * 自定义结束时间
     */
    private String custom_end_time2;
    /**
     * 自定义开始时间
     */
    private String custom_begin_time3;
    /**
     * 自定义结束时间
     */
    private String custom_end_time3;
    /**
     * 自定义单次上传数量
     */
    private int custom_upload_size;
    /**
     * Cpu阈值
     */
    private float alarm_cpu;
    /**
     * 内存阈值
     */
    private float alarm_memory;
    /**
     * 磁盘阈值
     */
    private float alarm_disk;
    /**
     * 网络阈值
     */
    private float alarm_net;
    /**
     * 记录时间
     */
    private String record_time;
    /**
     * 更新时间
     */
    private String update_time;

    /**
     * 使用时间截止(历史信息专用)
     */
    private String update_time_end;

    private String strategy_info_str;

    public String getStrategy_info_str() {
        StringBuilder info = new StringBuilder();
        if (this.is_free > 0) {
            info.append("[空闲]CPU").append(this.free_min_cpu).append("%-内存").append(this.free_min_memory).append("%");
           /* info.append("-磁盘").append(this.free_min_disk).append("%-网络带宽").append(this.free_min_net).append("% ;");*/
            info.append("-磁盘").append(this.free_min_disk).append("%; ");
            info.append("[繁忙]CPU").append(this.free_max_cpu).append("%-内存").append(this.free_max_memory).append("%");
            /*info.append("-磁盘").append(this.free_max_disk).append("%-网络带宽").append(this.free_max_net).append("% ;");*/
            info.append("-磁盘").append(this.free_max_disk).append("%;");
        } else {
            if (this.custom_type != null)
                switch (this.custom_type) {
                    case "custom":
                        info.append("[自定义]");
                        if (custom_begin_time != null && !custom_begin_time.isEmpty() && custom_end_time != null && !custom_end_time.isEmpty())
                            info.append(custom_begin_time).append("-").append(custom_end_time);
                        if (custom_begin_time2 != null && !custom_begin_time2.isEmpty() && custom_end_time2 != null && !custom_end_time2.isEmpty()) {
                            if (info.indexOf("-") >= 0) info.append(" - ");
                            info.append(custom_begin_time2).append("-").append(custom_end_time2);
                        }
                        if (custom_begin_time3 != null && !custom_begin_time3.isEmpty() && custom_end_time3 != null && !custom_end_time3.isEmpty()) {
                            if (info.indexOf("-") >= 0) info.append(" - ");
                            info.append(custom_begin_time3).append("-").append(custom_end_time3);
                        }
                        break;
                    case "everyworkday":
                        info.append("[工作日]").append(custom_interval);
                        break;
                    case "everyweekend":
                        info.append("[休息日]").append(custom_interval);
                        break;
                    case "everyday":
                        info.append("[每天]").append(custom_interval);
                        break;
                }
        }
        strategy_info_str = info.toString();
        return strategy_info_str;
    }

    public void setStrategy_info_str(String strategy_info_str) {
        this.strategy_info_str = strategy_info_str;
    }

    public String getStrategy_id() {
        return strategy_id;
    }

    public void setStrategy_id(String strategy_id) {
        this.strategy_id = strategy_id;
    }

    public String getStrategy_name() {
        return strategy_name;
    }

    public void setStrategy_name(String strategy_name) {
        this.strategy_name = strategy_name;
    }

    public String getProxy_id() {
        return proxy_id;
    }

    public void setProxy_id(String proxy_id) {
        this.proxy_id = proxy_id;
    }

    public String getProxy_name() {
        return proxy_name;
    }

    public void setProxy_name(String proxy_name) {
        this.proxy_name = proxy_name;
    }

    public String getProxy_ip() {
        return proxy_ip;
    }

    public void setProxy_ip(String proxy_ip) {
        this.proxy_ip = proxy_ip;
    }

    public int getIs_free() {
        return is_free;
    }

    public void setIs_free(int is_free) {
        this.is_free = is_free;
    }

    public float getFree_min_cpu() {
        return free_min_cpu;
    }

    public void setFree_min_cpu(float free_min_cpu) {
        this.free_min_cpu = free_min_cpu;
    }

    public float getFree_max_cpu() {
        return free_max_cpu;
    }

    public void setFree_max_cpu(float free_max_cpu) {
        this.free_max_cpu = free_max_cpu;
    }

    public float getFree_min_memory() {
        return free_min_memory;
    }

    public void setFree_min_memory(float free_min_memory) {
        this.free_min_memory = free_min_memory;
    }

    public float getFree_max_memory() {
        return free_max_memory;
    }

    public void setFree_max_memory(float free_max_memory) {
        this.free_max_memory = free_max_memory;
    }

    public float getFree_min_disk() {
        return free_min_disk;
    }

    public void setFree_min_disk(float free_min_disk) {
        this.free_min_disk = free_min_disk;
    }

    public float getFree_max_disk() {
        return free_max_disk;
    }

    public void setFree_max_disk(float free_max_disk) {
        this.free_max_disk = free_max_disk;
    }

    public float getFree_min_net() {
        return free_min_net;
    }

    public void setFree_min_net(float free_min_net) {
        this.free_min_net = free_min_net;
    }

    public float getFree_max_net() {
        return free_max_net;
    }

    public void setFree_max_net(float free_max_net) {
        this.free_max_net = free_max_net;
    }

    public int getFree_upload_size() {
        return free_upload_size;
    }

    public void setFree_upload_size(int free_upload_size) {
        this.free_upload_size = free_upload_size;
    }

    public int getIs_custom() {
        return is_custom;
    }

    public void setIs_custom(int is_custom) {
        this.is_custom = is_custom;
    }

    public String getCustom_interval() {
        return custom_interval;
    }

    public void setCustom_interval(String custom_interval) {
        this.custom_interval = custom_interval;
    }

    public String getCustom_type() {
        return custom_type;
    }

    public void setCustom_type(String custom_type) {
        this.custom_type = custom_type;
    }

    public String getCustom_begin_time() {
        return custom_begin_time;
    }

    public void setCustom_begin_time(String custom_begin_time) {
        this.custom_begin_time = custom_begin_time;
    }

    public String getCustom_end_time() {
        return custom_end_time;
    }

    public void setCustom_end_time(String custom_end_time) {
        this.custom_end_time = custom_end_time;
    }

    public int getCustom_upload_size() {
        return custom_upload_size;
    }

    public void setCustom_upload_size(int custom_upload_size) {
        this.custom_upload_size = custom_upload_size;
    }

    public float getAlarm_cpu() {
        return alarm_cpu;
    }

    public void setAlarm_cpu(float alarm_cpu) {
        this.alarm_cpu = alarm_cpu;
    }

    public float getAlarm_memory() {
        return alarm_memory;
    }

    public void setAlarm_memory(float alarm_memory) {
        this.alarm_memory = alarm_memory;
    }

    public float getAlarm_disk() {
        return alarm_disk;
    }

    public void setAlarm_disk(float alarm_disk) {
        this.alarm_disk = alarm_disk;
    }

    public float getAlarm_net() {
        return alarm_net;
    }

    public void setAlarm_net(float alarm_net) {
        this.alarm_net = alarm_net;
    }

    public String getRecord_time() {
        return record_time;
    }

    public void setRecord_time(String record_time) {
        this.record_time = record_time;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public String getCustom_begin_time2() {
        return custom_begin_time2;
    }

    public void setCustom_begin_time2(String custom_begin_time2) {
        this.custom_begin_time2 = custom_begin_time2;
    }

    public String getCustom_end_time2() {
        return custom_end_time2;
    }

    public void setCustom_end_time2(String custom_end_time2) {
        this.custom_end_time2 = custom_end_time2;
    }

    public String getCustom_begin_time3() {
        return custom_begin_time3;
    }

    public void setCustom_begin_time3(String custom_begin_time3) {
        this.custom_begin_time3 = custom_begin_time3;
    }

    public String getCustom_end_time3() {
        return custom_end_time3;
    }

    public void setCustom_end_time3(String custom_end_time3) {
        this.custom_end_time3 = custom_end_time3;
    }


    public String getUpdate_time_end() {
        return update_time_end;
    }

    public void setUpdate_time_end(String update_time_end) {
        this.update_time_end = update_time_end;
    }
}
